package com.glsc.ngateway.common.api.oaflow.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;

/**
 * @Author: libj
 * @Date: 2022/07/22
 * @Desc: 同步OA流程表单数字证书信息Dto
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class SynOaDigitalKeyDto {

    @ApiModelProperty(value = "流程类型标识workflowId")
    protected String workflowId;

    @ApiModelProperty(value = "流程实例requestId")
    protected String requestId;

    @ApiModelProperty(value = "流程实例标题名称")
    protected String workflowName;

    @ApiModelProperty(value = "当前节点ID")
    protected Integer flowNodeCode;

    @ApiModelProperty(value = "流程状态类型")
    protected String flowStatusType;

    @ApiModelProperty(value = "当前节点，中文名，如强制归档、资管产品委委员发表意见等")
    protected String flowNode;

    @ApiModelProperty(value = "申请人ID")
    private String applicantAccount;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "申请部门ID")
    private Integer applyDeptId;

    @ApiModelProperty(value = "申请部门")
    private String applyDeptName;

    @ApiModelProperty(value = "申请类型")
    private String applyType;

    @ApiModelProperty(value = "申请类型编码")
    private Integer applyTypeCode;

    @ApiModelProperty(value = "流程类型")
    private String flowType;

    @ApiModelProperty(value = "流程类型编码")
    private String flowTypeCode;

    @ApiModelProperty(value = "变更类型编码")
    private Integer changeTypeCode;

    @ApiModelProperty(value = "申请时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String applyDate;

    @ApiModelProperty(value = "申请说明")
    private String applyDesc;

    @ApiModelProperty(value = "数字证书信息列表")
    protected List<SynOaDigitalKeyInfoDto> digitalKeyInfoDtoList;
}
/*

{
    "code":0,
    "data":[
        {
            "flowNodeCode":346477,
            "flowNode":"结束",
            "requestId":869357,
            "flowInfos":{
                "ID":2,
                "applyNumber":"szzsxgywlc20220700002",
                "applyDate":"2022-07-25",
                "applicant":"丁玥,dingyue@glsc.com.cn",
                "applicantDepart":"资产管理部/综合团队",
                "applicantComp":"国联证券总部",
                "flowType":"新增",
                "flowTypeCode":0,
                "detailMap1":[
                    {
                        "keyStatus":1,
                        "remark":"11",
                        "keyNo":"23466",
                        "useDesc":"111",
                        "addOfcustodian":"丁玥",
                        "addOfUseDepartment":"证券投资部/权益投资部",
                        "keyExpireDate":"2022-07-31",
                        "keyPlatform":"111",
                        "keyIsssueBranch":"111",
                        "addOfcustodianAccount":"dingyue",
                        "addOfUseDepartmentId":"2523"
                    },
                    {
                        "keyStatus":1,
                        "remark":"12",
                        "keyNo":"23467",
                        "useDesc":"111",
                        "addOfcustodian":"丁玥",
                        "addOfUseDepartment":"无锡分公司/总经理室",
                        "keyExpireDate":"2022-07-31",
                        "keyPlatform":"111",
                        "keyIsssueBranch":"111",
                        "addOfcustodianAccount":"dingyue",
                        "addOfUseDepartmentId":"208"
                    }
                ],
                "applicantAccount":"dingyue",
                "applicantDepartId":"803",
                "applicantCompId":"21"
            },
            "workflowName":"数字证书测试001",
            "flowStatusType":"3"
        }
    ],
    "status":"SUCCESS"
}

* */